////////////////////////////////////////////////////////////////
///
/// File: TmpExp.h
/// Author: Lucio Davide Spano
/// Last update: 17 August 2012
/// Description: This file contains the basic class for
///              building temporal gesture expressions
/// To do:
/// ------------------------------------------------------------
/// Copyright (c) 2012 Lucio Davide Spano
///                     (lucio.davide.spano@isti.cnr.it)
///
/// The use and distribution terms for this software are
/// contained in the file named license.txt, which can be found
/// in the root of this distribution.
/// By using this software in any fashion, you are agreeing to
/// be bound by the terms of this license.
///
/// You must not remove this notice, or any other, from this
/// software.
/// ------------------------------------------------------------
////////////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>

// Execution states

typedef enum{
   Disabled, Completed, Enabled, Performing, Error
} ExecState;

typedef enum{
    Simple, Binary, Complex
} ExpType;

typedef enum{
    ImmediateChoice,
    Choice,
    Enabling,
    SynchronizedParallel,
    Parallel,
    Disabling,
    OrderIndependence,
    None
} TmpOperator;



@class Token, GestureListener,ExpEventArgs;
@interface TmpExp : NSObject

{
    NSMutableArray *stateChangedListeners;
    NSMutableArray *gestureListeners;
    
}

@property (readonly) ExecState state;
@property (readonly, retain) TmpExp *parent;
@property bool iterative;
@property bool optional;
@property (readonly) ExpType type;

- (id) init;
- (void) setExecState :(int) state :(Token*) token;
- (bool) accepts:(ExpEventArgs*) args; 
- (void) addGestureListener :(GestureListener*) listener;
- (void) removeGestureListener:(GestureListener*) listener;





@end
